<h1>我的订单</h1>
<div class="row">
  <div class="container">
    <% @orders.each do |order| %>
      <div class="media shopping-cart-row">
        <div class="media-left">
          <%= image_tag order.product.main_product_image.image.url(:small), class: 'media-object', alt: order.product.title %>
        </div>
        <div class="media-body">
          <h4 class="media-heading">订单号: <%= order.order_no %></h4>
          <p><%= order.product.title %></p>
          <p>数量: <%= order.amount %> 价格: ¥<%= order.total_money %></p>
          <p><span class="label <%= order.is_paid? ? 'label-success' : 'label-warning' %>"><%= order.is_paid? ? '已付款' : '未付款' %></span> <%= order.address.contact_name %> <%= order.address.cellphone %> <%= order.address.address %></p>
        </div>
      </div>
    <% end -%>

    <%= will_paginate @orders %>
  </div>
</div>
